package com.htao.train.business.controller;

import com.htao.train.business.req.SeatSellReq;
import com.htao.train.business.resp.SeatSellResp;
import com.htao.train.business.service.DailyTrainSeatService;
import com.htao.train.common.resp.CommonResp;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author： HTTT
 * @Date： 2024/1/29 16:18
 * @Describe：
 */
@RestController
@RequestMapping("seat-sell")
public class SeatSellController {
    @Resource
    private DailyTrainSeatService dailyTrainSeatService;
    @GetMapping("/query")
    public CommonResp<List<SeatSellResp>> query(@Valid SeatSellReq req) {
        List<SeatSellResp> seatList = dailyTrainSeatService.querySeatSell(req);
        return new CommonResp<>(seatList);
    }
}
